#pragma once
#include "../mqcommon/mq_msg.pb.h"
#include <memory>

namespace mq_zxws
{
    using ConsumerCallBack = std::function<void(const std::string, const BasicProperties*, const std::string)>;
    struct Consumer{
        using ptr = std::shared_ptr<Consumer>;
        std::string tag;   // 消费者标识
        std::string qname; // 订阅的消息队列
        bool auto_ack;
        ConsumerCallBack callback;

        Consumer(){}
        Consumer(const std::string& ctag, const std::string queue_name, bool ack, const ConsumerCallBack& cb)
            :tag(ctag)
            ,qname(queue_name)
            ,auto_ack(ack)
            ,callback(cb)
        {}
    };
}